Represents metadata within a manifest.
Namespace: Microsoft.LearningComponents.Manifest
Assembly: Microsoft.LearningComponents.dll
| C# |
|
public class MetadataNodeReader : IXPathNavigable |
| Name | Description | |
| Ð | Location | Gets the location of the metadata information, if it is external to the manifest. If this value returns a location that indicates the metadata information is not in the package, then other properties in this object will not read their values. If the location is within the package or if there is no location specified, this object will provide properties to read and parse those values. |
| Name | Description | |
| Ð | CreateNavigator | Gets metadata in XPathNavigator format. |
| Ð | GetDescriptions () | Gets a collection of general description values that matches the current culture. |
| Ð | GetDescriptions (CultureInfo) | Gets a collection of general description values that most closely match the requested culture. |
| Ð | GetTitle () | Gets the title associated with this metadata that matches the current culture. |
| Ð | GetTitle (CultureInfo) | Gets the general title associated with this metadata that best matches the specified culture. |
This class does very little error checking or parsing of metadata, and is provided to simplify obtaining the title and description of a metadata block. The first call to GetTitle or GetDescriptions will throw InvalidPackageException if the <adlcp:location> of the <metadata> points to a file that can not be obtained. Thereafter, they return String.Empty.
When obtained via a Metadata property on ManifestReader, OrganizationNodeReader, ActivityNodeReader, ResourceNodeReader, or FileNodeReader, the GetTitle is called before the MetadataNodeReader is returned. If a InvalidPackageException is thrown during this calls, it is caught and handled according to the chosen ManifestReaderSettings and package validation enforcement.
This means that any additional calls to GetTitle or GetDescriptions will return String.Empty.